package vip.xiaonuo.hontu.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;
import vip.xiaonuo.hontu.listener.handle.PushDataHandleCenter;
import vip.xiaonuo.modular.htpushdata.entity.HtPushData;

import javax.annotation.Resource;

/**
 * 订阅者(数据处理)
 */
@Service
@Slf4j
public class HongTuActivePushDataHandler {

    @Resource
    private PushDataHandleCenter handleCenter;

    @EventListener
    public void getListenerData(HongTuActivePushEvent event) {
        HtPushData push = (HtPushData)event.getSource();
        handleCenter.handleData(push);
    }

}
